package com.jz.pay.bo;

import org.apache.rocketmq.client.producer.SendCallback;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.spring.core.RocketMQLocalRequestCallback;
import org.springframework.messaging.Message;

import java.util.List;
import java.util.Map;

public interface RocketMQBO {
    void send(String topic, Message<?> message);
    void send(String topic, String body);
    void send(String topic, String body, Map<String, ?> headers);
    void sendMessageInTransaction(String topic, String body, Map<String, ?> headers);
    void sendMessageCallback(String topic, String body, Map<String, ?> headers , RocketMQLocalRequestCallback callback);
    void asyncSend(String topic, String body, Map<String, ?> headers, SendCallback sendCallback);
    SendResult asyncSendBatch(String topic, List<String> body, Map<String, ?> headers);
}
